package com.zb.vo;

import com.zb.annotation.ListPattern;
import com.zb.annotation.NumberPattern;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;
import java.util.List;

/**
 * @Author WEN
 * @Date 2024/2/4 0004
 **/
@Data
@ApiModel("SLA触发条件对象")
public class WorkSlaConditionVo {
    @ApiModelProperty(value = "触发条件ID，新增不必传，修改必传")
    private Long id;

    @NotNull(message = "触发条件类型不能为空")
    @NumberPattern(regexp = "^(1|2|3|4|5|6|7)$", message = "触发条件类型参数不合法")
    @ApiModelProperty(value = "触发条件类型：1-未分配客服，2-未派单，3-服务商未接单，4-工程师未接单，5-工程师未拨打电话，6-工程师未预约，7-工程师未签到", required = true)
    private Integer type;

    @NotNull(message = "是否开启节点时效项不能为空")
    @ApiModelProperty(value = "是否开启节点时效：false-不开启，true-开启", required = true, example = "false")
    private Boolean enabled;

    @ApiModelProperty(value = "时效，单位小时，当ienabled=true时生效", example = "0")
    private Integer ageingTime;

    @ApiModelProperty(value = "是否启用超时前提醒：false-不启用，true-启用", required = true, example = "false")
    private Boolean enableBeforeOverTimeRemind = Boolean.FALSE;

    @ApiModelProperty(value = "超时前提醒时间，单位小时", example = "0")
    private Integer beforeOverTimeRemindTime;

    @ListPattern(regexp = {"1", "2", "3", "4"}, message = "超时前提醒人员类型参数不合法")
    @ApiModelProperty(value = "超时前提醒人员类型：1-工单客服，2-指定人员，3-服务商负责人，4-工程师", example = "['2']")
    private List<String> beforeOverTimeRemindEmpType;

    @ApiModelProperty(value = "是否启用超时后提醒：false-不启用，true-启用", required = true, example = "false")
    private Boolean enableAfterOverTimeRemind = Boolean.FALSE;

    @ApiModelProperty(value = "超时后提醒时间，单位小时", example = "0")
    private Integer afterOverTimeRemindTime;

    @ListPattern(regexp = {"1", "2", "3", "4"}, message = "超时后提醒人员类型参数不合法")
    @ApiModelProperty(value = "超时后提醒人员类型：1-工单客服，2-指定人员，3-服务商负责人，4-工程师", example = "['2']")
    private List<String> afterOverTimeRemindEmpType;

    @ApiModelProperty(value = "超时前提醒指定人员ID对象")
    private List<Long> slaBeforeOverTimeRemindEmpIds;

    @ApiModelProperty(value = "超时后提醒指定人员ID对象")
    private List<Long> slaAfterOverTimeRemindEmpIds;

}
